<template>
	<view class="" style="min-height: 100vh;"
		:style="{background:'url('+Imgbase+'/new_goodpai_img7.png)','background-size':'100%',}">
		<view class="zinde">
			<view class="" style="padding: 105rpx 20rpx 0;position: relative;z-index: 99;" @click="back">
				<image class="w-80 h-80 margin-top-10" :src="Imgbase + '/new_goodlx_img1.png'" mode="aspectFit">
				</image>
			</view>
		</view>
		<view class="padding-top-160 Afont padding-left-60 font-30 padding-bottom-50" style="color: #A15B25;">
			<view class="df alc padding-bottom-25" v-for="(item,index) in toplist" :key="index">
				<view class="font-26 padding-right-30">
					{{item.index}}
				</view>
				<view class="w-104 h-108 padding-6"
					:style="{background:'url('+Imgbase+'/new_goodmy_img1.png)','background-size':'100% 100%',}">
					<image class="w-100 h-100 radius-50" :src="item.avatar" mode="aspectFill"></image>
				</view>
				<view class=" padding-left-30 one-line" style="width: 48%;">
					{{item.nickname}}
				</view>
				<view class="">
					{{item.recharge}}
				</view>
			</view>
		</view>

		<view class="padding-20 Afont w-500 margin-auto h-580 radius-30" style="color: #A15B25;background-color: rgba(255, 255, 255, .7);">
			<scroll-view scroll-y class="w100 h100" scroll-with-animation style="overflow: hidden;"
				@scrolltolower="onbottom()">

				<view class="df alc padding-bottom-30" v-for="(item,index) in lastlist" :key="index">
					<!-- <view class="font-26 padding-right-20">
						{{item.index}}
					</view> -->
					<view class="w-104 h-108 padding-6"
						:style="{background:'url('+Imgbase+'/new_goodmy_img1.png)','background-size':'100% 100%',}">
						<image class="w-100 h-100 radius-50" :src="item.avatar" mode="aspectFill"></image>
					</view>
					<view class=" padding-left-20 one-line" style="width: 50%;">
						{{item.nickname}}
					</view>
					<view class="">
						{{item.recharge}}
					</view>
				</view>

			</scroll-view>

		</view>
		
		<view class="gojiang w100 text-center">
			<image @click="gojiangp" :src="Imgbase + '/1zhan_new_jiangbei.png'" class="w-350 h-120" mode="aspectFit">
			</image>
		</view>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				Imgbase: getApp().globalData.Imgbase,
				toplist: [],
				lastlist: [],
				page: 1
			}
		},
		onLoad(e) {

		},
		onShow() {
			this.rechargeTaskList()
		},
		methods: {
			back(){
				uni.navigateBack()
			},
			gojiangp() {
				uni.navigateTo({
					url: '/pagesA/advanced/ranking?id=1'
				})
			},
			onbottom() {
				this.page++;
				this.rechargeTaskList()
			},
			async rechargeTaskList() {
				let _this = this
				let item = await this.$api.post('rank/rechargeRank', {
					token: uni.getStorageSync('token'),
					// page: this.page,
				})
				_this.toplist = item.data.topList
				_this.lastlist = item.data.lastList
			},
		},
	}
</script>

<style lang="less" scoped>
.gojiang {
		position: fixed;
		padding-top: 5rpx;
		bottom: 30rpx;
		z-index: 2;
	}
</style>